﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using GSBA.ViewModels;
using GSBA.Common;

namespace GSBA.Views
{
    /// <summary>
    /// MainPage code behind class
    /// </summary>
    public sealed partial class MainPage : GSBA.Common.LayoutAwarePage
    {
        public MainPage()
        {
            this.InitializeComponent();

            this.DataContext = App.ViewModel;
        }

        void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
        }

        protected override void LoadState(object navigationParameter, Dictionary<string, object> pageState)
        {
            base.LoadState(navigationParameter, pageState);
        }

        protected override void SaveState(Dictionary<string, object> pageState)
        {
            base.SaveState(pageState);
        }

        private void TileGrid_ItemClick(object sender, ItemClickEventArgs e)
        {
            ((MainPageViewModel)this.DataContext).SelectedCategory = (NavigationItem)e.ClickedItem;
        }

    }
}
